const initState = {
    isLogin: false,
    name: '葛清霏',
    age: '17'
};

const userInfo = (state = initState, action) => {
    switch(action.type) {
        case "UPDATE_INFO":
            return { ...state, ...action.data, isLogin: true };
        default: 
            return state;
    }
}

export default userInfo;